<?php if (isset($add)) echo "<h2>Thêm khung giá mới</h2>"; else echo "<h2>Thay đổi khung giá</h2>";?>
<form name="edit_price_section" action="?act=createOrModifyPriceSection&price_section_id=<?php echo (isset($price_section_id)? $price_section_id:null) ?>" method="POST" enctype="multipart/form-data">
	<div class='row_field'>
        <div class='label'>
            <label for="section_name">Tên:</label>
        </div>
        <div class='field'>
            <input class='inputbox' type="text" id="section_name" name="section_name" width="200" value="<?php echo isset($price_section_id) ? $price_section->getname() : '' ?>">
        </div>
    </div>
    <div class='row_field'>
        <div class='label'>
			<label for="min_value">Giá Nhỏ Nhất(*):</label>
		</div>
         	<div class='field'>
                <input class='inputbox' type="text" id="min_value" name="min_value" value="<?php echo isset($price_section_id) ? $price_section->getmin_value() : '' ?>">
            </div>
    </div>
    <div class='row_field'>
        <div class='label'>
            <label for="max_value">Giá Lớn Nhất:</label>
        </div>
        <div class='field'>
            <input class='inputbox' type="text" id="max_value" name="max_value" width="200" value="<?php echo isset($price_section_id) ? $price_section->getmax_value() : '' ?>">
        </div>
    </div>
	<div class='row_field'>
		<div class='label'>
            <label for="currency">Đơn Vị:</label>
        </div>	
	<?php $currencies = get_currency_list() ?>
	<div class='field'>
	<select id="currency" name="currency" class='inputbox'>
		<?php foreach ($currencies as $currency) {?>
		<option value="<?php echo $currency['id'] ?>" <?php 
			if (isset($price_section_id) && $currency['id'] == $price_section->getcurrency())
				echo 'selected="selected"';
			elseif (isset($add) && $currency['currency_code'] == 'VND')
				echo 'selected="selected"' 
			?>><?php echo $currency['currency_code'] ?></option>
		<?php } ?>
	</select>
	</div>
	</div>
    <div class='row_field'>
        <input type='reset' value='Reset' class='button' />
        <input type="submit" value="Save" class='button' />
    </div>
</form>

	
